<?php
declare(strict_types=1);
//计时
Class module_time
{
    //精确到微秒的计时工具
    private array $start_time;
    public function start()
    {
        $this->start_time = hrtime();
    }
    public function end_seconds()
    {
        $end_time = hrtime();
        return $end_time[0] - $this->start_time[0];
    }
    public function end_nanoseconds()
    {
        $end_time = hrtime();
        return $end_time[1] - $this->start_time[1];
    }
}
